#pragma once

#include <osg/Program>
#include <osg/Uniform>
#include <osg/TextureCubeMap>
#include "vrdatacore_global.h"
#include "transformable.h"
#include "spheresegment.h"

namespace VrDataCore
{
	class CoreBase::ActorBase;
	class SkyDome : public CoreBase::Transformable
	{
	public:
		SkyDome(CoreBase::ActorBase* owneractor,const QString& name = "SkyDome");
		SkyDome(float radius,unsigned int longSteps,unsigned int latSteps,osg::TextureCubeMap* cubemap,
			CoreBase::ActorBase* owneractor,const QString& name = "SkyDome");
	protected:
		~SkyDome(void);
	public:
		void setupStateSet( osg::TextureCubeMap* cubemap);
		void create( float radius, unsigned int latSteps, unsigned int longSteps, osg::TextureCubeMap* cubemap);
		void setCubeMap( osg::TextureCubeMap* cubemap);
	private:
		osg::ref_ptr<osg::Program> createShader(void);
		osg::ref_ptr<SphereSegment>				_sphereSegmentDrawable;
	};
}